# env = test 测试
# env = dev 测试外网
# env = prod 正式
# env = prod_local 正式外网
# make win-build-linux env=test
env :=

win-build-win:
	@cmd /C set CGO_ENABLED=0&& set GOOS=windows&& set GOARCH=amd64&& go build -ldflags "-X mcp-demo/internal/global.ENV=$(env)" -o mcp-demo.exe ./cmd

win-build-linux:
	@cmd /C set CGO_ENABLED=0&& set GOOS=linux&& set GOARCH=amd64&& go build -ldflags "-w -s -X mcp-demo/internal/global.ENV=$(env)" -o mcp-demo ./cmd

win-build-mac:
	@cmd /C set CGO_ENABLED=0&& set GOOS=darwin&& set GOARCH=amd64&& go build -ldflags "-w -s -X mcp-demo/internal/global.ENV=$(env)" -o mcp-demo ./cmd

refresh:
	@go clean -modcache
	@go mod tidy

swagger:
	@swag init